<template>
	<list-scroll class="list-scroll" @loadmored="loadmore">
		<list-card v-for="(item,index) in list" :key="item._id" :item="item"></list-card>
		<uni-load-more :status="load.loading" iconType="circle" v-if="list.length === 0 || list.length > 5"></uni-load-more>
	</list-scroll>
</template>

<script>
	export default{
		props:{
			list:{
				type: Array,
				default (){
					return []
				}
			},
			load:{
				type: Object,
				default(){
					return {
						loading: "loading"
					}
				}
			}
		},
		methods:{
			loadmore(){
				this.$emit('loadmore');
			},
		}
	}
</script>

<style>
	.list-scroll{
		height: 100%;
	}
</style>